/**
 * 
 */
package lu.med.praxiswahl.wahlumed.model.beans;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 * @author PatrickPierre
 * 
 */
@Entity
@Table(name = "PRAXIS_BRIEFE")
public class PhysicianLetterTBL implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5354905498790096010L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Temporal(javax.persistence.TemporalType.DATE)
	private Calendar datum;

	@Column(name = "ABSENDER", nullable = false)
	private String sender;

	@Column(name = "ADRESSAT", nullable = false)
	private String receiver;

	@Column(name = "SPEICHER_ORT", nullable = false)
	private String documentPath;

	@OneToOne
	@JoinColumn(name = "LAST_EDITOR", nullable = true)
	private AccountingTBL lastEditor;

	@Column(name = "LAST_EDITED")
	@Temporal(javax.persistence.TemporalType.TIMESTAMP)
	private Calendar lastEditTime;

	@ManyToOne
	@JoinColumn(name = "CUST_ID", nullable = false)
	private CustomerTBL customer;

	public PhysicianLetterTBL() {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Calendar getDatum() {
		return datum;
	}

	public void setDatum(Calendar datum) {
		this.datum = datum;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getDocumentPath() {
		return documentPath;
	}

	public void setDocumentPath(String documentPath) {
		this.documentPath = documentPath;
	}

	public AccountingTBL getLastEditor() {
		return lastEditor;
	}

	public void setLastEditor(AccountingTBL lastEditor) {
		this.lastEditor = lastEditor;
	}

	public Calendar getLastEditTime() {
		return lastEditTime;
	}

	public void setLastEditTime(Calendar lastEditTime) {
		this.lastEditTime = lastEditTime;
	}

	public CustomerTBL getCustomer() {
		return customer;
	}

	public void setCustomer(CustomerTBL customer) {
		this.customer = customer;
	}
	
	

}
